<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Electron Desktop</title>
</head>

<body>
  <p>当前系统是采用暗黑模式：<span id="isDarkMode"></span></p>
  <button onclick="preloadApi.setTheme('light')">设置浅色</button>
  <button onclick="preloadApi.setTheme('dark')">设置深色</button>
  <style>
    @media (prefers-color-scheme: dark) {
      body {
        background-color: black;
        color: white;
      }
    }
  </style>
</body>

</html>